package com.atguigu.dao;

import com.atguigu.base.BaseDao;
import com.atguigu.entity.Permission;

import java.util.List;

/**
 * @author 杨林
 * @create 2022-09-29 15:57 星期四
 * description:
 */
public interface PermissionDao extends BaseDao<Permission> {

    List<Permission> findAll();

    List<Permission> findAllMenuPermission();

    List<Permission> findMenuPermissionByAdminId(Long adminId);

    /**
     * 获取所有的功能权限
     * @return
     */
    List<String> findAllCode();

    /**
     * 根据用户id获取功能权限
     * @param adminId
     * @return
     */
    List<String> findCodeList(Long adminId);

    Permission findPermissionByPermissionId(Long id);
}
